/**
 * Created with IntelliJ IDEA.
 * Description:二叉树的镜像
 * User: wangxin
 * Date: 2024-11-07
 * Time: 22:11
 */
public class test2 {
    public TreeNode Mirror (TreeNode pRoot) {
        // write code here
        if(pRoot == null){
            return null;
        }

        TreeNode curl = Mirror(pRoot.left);
        TreeNode curr = Mirror(pRoot.right);
        pRoot.left = curr;
        pRoot.right = curl;


        return pRoot;
    }
}
